package com.its.us.application;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @Author: master
 * @Date: 2020/11/2 12:51
 * @Version: 1.0
 */
public abstract class MyListener extends TimerTask implements ApplicationListener<ContextRefreshedEvent> {

    public MyListener() {
    }

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.err.println("init bean size:" + event.getApplicationContext().getBeanDefinitionCount());
//        Timer timer = new Timer();
//        timer.schedule(this, 0L);
    }
}
